package phapp.model.data;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: t_qfdtext_data 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Qfdtext extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;

   // columns START
   /** textId */
   private java.lang.Integer textId;
   /** 1测运语 2祈福语 */
   private java.lang.String textType;
   /** 1感情 2事业 */
   private java.lang.String textSubtype;
   /** 1上 2中 3下 */
   private java.lang.String textLevel;
   /** textContent */
   private java.lang.String textContent;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;

   private java.lang.String textTypeStr;
   private java.lang.String textSubtypeStr;
   private java.lang.String textLevelStr;
   
   
   private java.util.ArrayList idList;

   // columns END

   public Qfdtext()
   {
   }

   public Qfdtext(java.lang.Integer textId)
   {
      this.textId = textId;
   }

   public void setId(java.lang.Integer value)
   {
      this.textId = value;
   }

   public java.lang.Integer getId()
   {
      return this.textId;
   }
   
   public void setTextId(java.lang.Integer value)
   {
      this.textId = value;
   }

   public java.lang.Integer getTextId()
   {
      return this.textId;
   }

   public java.lang.String getTextTypeStr()
   {
      return textTypeStr;
   }

   public void setTextTypeStr(java.lang.String textTypeStr)
   {
      this.textTypeStr = textTypeStr;
   }

   public java.lang.String getTextSubtypeStr()
   {
      return textSubtypeStr;
   }

   public void setTextSubtypeStr(java.lang.String textSubtypeStr)
   {
      this.textSubtypeStr = textSubtypeStr;
   }

   public java.lang.String getTextLevelStr()
   {
      return textLevelStr;
   }

   public void setTextLevelStr(java.lang.String textLevelStr)
   {
      this.textLevelStr = textLevelStr;
   }

   public void setTextType(java.lang.String value)
   {
      this.textType = value;
   }

   public java.lang.String getTextType()
   {
      return this.textType;
   }

   public void setTextSubtype(java.lang.String value)
   {
      this.textSubtype = value;
   }

   public java.lang.String getTextSubtype()
   {
      return this.textSubtype;
   }

   public void setTextLevel(java.lang.String value)
   {
      this.textLevel = value;
   }

   public java.lang.String getTextLevel()
   {
      return this.textLevel;
   }

   public void setTextContent(java.lang.String value)
   {
      this.textContent = value;
   }

   public java.lang.String getTextContent()
   {
      return this.textContent;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("TextId", getTextId()).append("TextType", getTextType()).append("TextSubtype", getTextSubtype()).append("TextLevel", getTextLevel()).append("TextContent", getTextContent())
               .append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getTextId()).append(getTextType()).append(getTextSubtype()).append(getTextLevel()).append(getTextContent()).append(getCreateDate()).append(getUpdateDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if (obj instanceof Qfdtext == false) return false;
      if (this == obj) return true;
      Qfdtext other = (Qfdtext) obj;
      return new EqualsBuilder().append(getTextId(), other.getTextId()).append(getTextType(), other.getTextType()).append(getTextSubtype(), other.getTextSubtype()).append(getTextLevel(), other.getTextLevel())
               .append(getTextContent(), other.getTextContent()).append(getCreateDate(), other.getCreateDate()).append(getUpdateDate(), other.getUpdateDate()).isEquals();
   }
}
